package com.aabbc.querydsl.controller;

import com.aabbc.querydsl.dto.UserDTO;
import com.aabbc.querydsl.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * UserController
 *
 * @author: <a href="mailto:chenfenghai@oristartech.com">chenfenghai</a>
 * @version: 1.0
 * @date: 2019-11-12 16:30
 */
@RestController
public class UserController {

    @Autowired
    UserService userService;

    @GetMapping("/user")
    public List<UserDTO> userDto() {
        return userService.selectAllUserDTOList();
    }
}
